{% extends "index.html" %}

{% block sidebar %}
<h3>Submit Your Masterpiece</h3>
<div class="sb1">
<div>Think your story is ready for public viewing?<br><br>Submit it and let our editors take a peek.<br><br>If it's OK (no dirty stuff!), we'll have it up on the front page in no time.</div>
{% endblock %}

{% block main %}
<div class="book3">
	{% if error %}
	{{ error }}
	{% else %}
		{% if comment %}
			{{ comment }}<br><br>Redirecting you back to the submission form in 5 seconds...
			<script language="JavaScript" type="text/javascript">
			setTimeout("window.location.replace('/submit?myAdventureKey={{ adventureStatus.editableAdventure.key }}');", 5000);
			</script>
		{% else %}
	<table class="submitHeader">
		<tr><th colspan="2" style="text-align:center;">Story Submission Status</th>
		</tr><tr><td style="width:120px;">{{ adventureStatus.statusName }}:</td><td>{{ adventureStatus.statusDesc }}</td>
		</tr><tr><td style="width:120px;">Modified Date:</td><td>{{ adventureStatus.modified.date }}</td>
		{% if adventureStatus.editorComment %}</tr><tr><td colspan="2">Editor Comments: {{ adventureStatus.editorComment|escape }}</td>{% endif %}
	</tr></table>
</div>

<div class="book3">
	<table class="submitHeader">
		<tr>
			<th style="text-align:center;">Editable Story</th>
			<th style="text-align:center;">Submitted Story</th>
			<th style="text-align:center;">Deployed Story</th>
		</tr>
		<tr>
			<td style="text-align:center;">Version: 
			{% if adventureStatus.editableAdventure %} {{ adventureStatus.editableAdventure.version }}{% else %}-{% endif %}
			</td>
			<td style="text-align:center;">Version: 
			{% if adventureStatus.submittedAdventure %} {{ adventureStatus.submittedAdventure.version }}{% else %}-{% endif %}
			</td>
			<td style="text-align:center;">Version: 
			{% if adventureStatus.publishedAdventure %} {{ adventureStatus.publishedAdventure.version }}{% else %}-{% endif %}
			</td>
		</tr>
	</table>
</div>

<div class="book3">
	<table class="submit">
		<tr><td colspan="2" style="text-align:center;">Once you submit your story, it will be duplicated.</td>
		</tr><tr>
			<td>This duplicate will be reviewed by our editors, and if approved, will be made available to all users. You will not be able to edit this version of the story.</td>
			<td>The original version of your story will still be available to you for further editing. Any changes made will only be made to this version. The published version will remain unchanged. If you want to publish a new version, just submit the story again.</td>
		</tr><tr><td colspan="2" style="text-align:center;">Story Submission Comments:
	</tr></table>
	<form method="post" action="/submit">
	<textarea name="comment" rows="5" cols="50">{% if adventureStatus.comment %}{{ adventureStatus.comment }}{% endif %}</textarea>
	<p><input type="submit" value="Submit Your Story For Approval" onclick="this.form.submit();this.disabled=true"></p>
	<input type="hidden" name="myAdventureKey" value="{{ adventureStatus.editableAdventure.key }}">
	</form>
</div>

		{% endif %}
	{% endif %}
{% endblock %}

{% block index %}
{% endblock %}
